/* $Id: SingleClientCompanyDomainObjectManager.java 
 * Copyright (C) 2011, TRAKHEES
 *  
 * Revision History
 *
 * Date  			Author 		    	Remarks
 * ---------------------------------------------------------------------------------
 *
 */
package ae.pcfc.etks.online.common.domain.manager;

import java.util.List;
import java.util.Map;

import ae.pcfc.etks.online.common.domain.ClientCompanyReq;
import ae.pcfc.etks.online.common.domain.TTscClientCategory;
import ae.pcfc.etks.online.common.domain.TTscClientCompany;
import ae.pcfc.etks.online.common.domain.TTscLicType;
import ae.pcfc.etks.online.common.exception.LookupException;
import ae.pcfc.etks.online.common.exception.PersistenceException;
import ae.pcfc.etks.online.common.vo.ActivityVO;
import ae.pcfc.etks.online.common.vo.ClientNameVO;
import ae.pcfc.etks.online.common.vo.LicenseVO;
import ae.pcfc.etks.online.common.vo.NonClientCompanyVO;
import ae.pcfc.etks.online.common.vo.SCClientCompanyRoleVO;
import ae.pcfc.etks.online.common.vo.SearchCriteriaActivityVO;
import ae.pcfc.etks.online.common.vo.SearchCriteriaCompanyVO;
import ae.pcfc.etks.online.common.vo.TrakheesIdAndPINVO;


public interface SingleClientCompanyDomainObjectManager extends
		BaseDomainObjectManager {
	
	/**
	 * add
	 * Method to add client company request
	 * @param companyReq
	 * @return
	 * @throws PersistenceException
	 * Map<String,String>
	 */
	public Map<String, String> add(ClientCompanyReq companyReq)  throws PersistenceException;
	
	/**
	 * findSCCompanyByTrakheesId
	 * Method to find the client company information by trakhees id
	 * @param trakheesId
	 * @return
	 * @throws LookupException
	 * TTscClientCompany
	 */
	public TTscClientCompany findSCCompanyByTrakheesId(String trakheesId) throws LookupException;
	
	/**
	 * findSCCompanyRoleByTrakheesId
	 * Method to find the list of company roles associated with a client (trakhees id)
	 * @param trakheesId
	 * @return
	 * @throws LookupException
	 * List<SCClientCompanyRoleVO>
	 */
	public List<SCClientCompanyRoleVO> findSCCompanyRoleByTrakheesId(String trakheesId) throws LookupException;
	
	/**
	 * addSCCompanyRole
	 * Method to add client company role
	 * @param roleId
	 * @param trakheesId
	 * @param strUserName
	 * @throws PersistenceException
	 * void
	 */
	public void addSCCompanyRole(Long roleId, String trakheesId, String strUserName) throws PersistenceException;
	
	/**
	 * findTrakheesIdAndPinByEmail
	 * Method to find trakhees id and pin based on the client's email address
	 * @param email
	 * @return
	 * @throws LookupException
	 * TrakheesIdAndPINVO
	 */
	public TrakheesIdAndPINVO findTrakheesIdAndPinByEmail(String email) throws LookupException;
	
	/**
	 * validateLicense
	 * Method to validate license
	 * @param licenseVO
	 * @return
	 * @throws LookupException
	 * boolean
	 */
	public boolean validateLicense(LicenseVO licenseVO) throws LookupException;
	
	/**
	 * findSCClientCompanyByVO
	 * Method to client companies based on search criteria
	 * @param nonClientCompanyVO
	 * @return
	 * @throws LookupException
	 * List<TTscClientCompany>
	 */
	public List<TTscClientCompany> findSCClientCompanyByVO(NonClientCompanyVO nonClientCompanyVO) throws LookupException;
	
	/**
	 * validateClientName
	 * Method to validate client name
	 * @param clientNameVO
	 * @return
	 * @throws LookupException
	 * boolean
	 */
	public boolean validateClientName(ClientNameVO clientNameVO) throws LookupException;
	
	/**
	 * getClientCategory
	 * Method to find the list of client categories based on client type
	 * @param clientType
	 * @return
	 * @throws LookupException
	 * List<TTscClientCategory>
	 */
	public List<TTscClientCategory> getClientCategory(String clientType) throws LookupException;
	
	/**
	 * getClientCategoryById
	 * Method to find the client category domain object by category id
	 * @param categoryId
	 * @return
	 * @throws LookupException
	 * TTscClientCategory
	 */
	public TTscClientCategory getClientCategoryById(String categoryId) throws LookupException;
	
	/**
	 * getClientLicenseTypeByCode
	 * Method to find the client license type by license type code
	 * @param licenseTypeCode
	 * @return
	 * @throws LookupException
	 * TTscLicType
	 */
	public TTscLicType getClientLicenseTypeByCode(String licenseTypeCode) throws LookupException;
	
	/**
	 * searchCompany
	 * Method to search client companies based on search criteria
	 * @param searchCriteriaCompanyVO
	 * @return
	 * @throws LookupException
	 * List<TTscClientCompany>
	 */
	public List<TTscClientCompany> searchCompany(SearchCriteriaCompanyVO searchCriteriaCompanyVO) throws LookupException;

	/**
	 * findActivitiesOfClientCompany
	 * Method to find activities of a company based on search criteria
	 * @param searchCriteriaActivityVO
	 * @return
	 * List<ActivityVO>
	 */
	public List<ActivityVO> findActivitiesOfClientCompany(SearchCriteriaActivityVO searchCriteriaActivityVO);

	/**
	 * removeSCCompanyRole
	 * Method to add client company role
	 * @param roleId
	 * @param trakheesId
	 * @param strUserName
	 * @throws PersistenceException
	 * void
	 */
	public void removeSCCompanyRole(Long roleId, String cTrakheesId, String strUserName);

	public void undoCreateCompany(ClientCompanyReq clientCompanyReq, String strTrakheesId);
}
